package com.example.springflowable.ask_for_overtime.event;

import com.example.springflowable.controller.ProcessController;
import org.flowable.bpmn.model.FlowElement;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Classname MannagerSuccess
 * @Description TODO
 * @Date 2022/5/9 14:32
 * @Created by XiongXiong
 * @Author: X.I.O
 */
public class MannagerSuccess implements JavaDelegate {

    Logger logger= LoggerFactory.getLogger(MannagerSuccess.class);

    @Override
    public void execute(DelegateExecution execution) {
        logger.info("经理审核成功了流程id："+execution.getProcessInstanceId());
        logger.info("当前节点id: "+execution.getCurrentActivityId());
        logger.info("事件名称: "+execution.getEventName());
        logger.info("流程版本id: "+execution.getProcessDefinitionId());
        FlowElement element=execution.getCurrentFlowElement();
        System.out.println(element.getName());
        System.out.println(element.getDocumentation());
    }
}
